{% extends "base.html" %}

{% block main_content%}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
    <h3 class="h3">首页</h3>
</div>
<div class="col-sm-10">
    {% for current_obj in object_list %}
    <div>
        {% if current_obj.role == "user" %}
        你：{{current_obj.content}}
        {% else %}
        AI：{{current_obj.处理后content}}
        {% endif %}
    </div>
    {% endfor %}

    <form method="POST">
        {% csrf_token %}
        <div class="form-group row">
            <label for="inputEmail3" class="col-sm-2 col-form-label">输入你的问题</label>
            <div class="col-sm-6">
                <input type="input" class="form-control" name="question">
            </div>
            <button type="submit" class="btn btn-primary">提交</button> &nbsp;
        </div>
    </form>

    <a href="/newtalk" class="btn btn-warning">开始新对话</a>
</div>
{% endblock %}